function latex_table = create_latex_table_1x4(data, caption_text)
    x = data;
    x_tex = cellfun(@(v) sprintf('%g', v), num2cell(x), 'UniformOutput', false);
    for i = 1:size(x, 1)
        for j = 1:size(x, 2)
            exp = floor(log10(x(i,j)));
            mant = x(i,j) / 10^exp;
            x_tex{i,j} = sprintf('%.1f \\times 10^{%d}', mant, exp);
            if exp == -1 || exp == 0 %|| exp == -2 
                x_tex{i,j} = sprintf('%.2f ',x(i,j));
            end
        end 
    end
    data = x_tex;

    table_content = ["\\centering{}", ...
                     "\\begin{tabular}{ccccccc}", ...
                     "\\hline", ...
                     "\\multicolumn{3}{c}{Infinity Norm} & & \\multicolumn{3}{c}{Root Mean Square Error}\\tabularnewline", ...
                     "\\cline{1-3} \\cline{5-7}", ...
                     "Iterative & & Recursive & & Iterative & & Recursive\\tabularnewline", ...
                     "\\hline", ...
                     "\\hline"];

    row = sprintf('$%s$ & & $%s$ & & $%s$ & & $%s$\\tabularnewline', data{1, 1}, data{1, 2}, data{1, 3}, data{1, 4});
    table_content(end + 1) = row;

    table_content(end + 1) = "\\hline";
    table_content(end + 1) = "\\end{tabular}";
    
%     if nargin > 1 && ~isempty(caption_text)
%         table_content(end + 1) = strcat("\\caption{", caption_text, "}");
%     end
    
    %table_content(end + 1) = "\\end{table}";

    latex_table = strjoin(table_content, '\n');
    latex_table = strrep(latex_table, '\\', '\');
end
